package common

const (
	BUILD_STATUS_PENDING = "pending"
	BUILD_STATUS_READY   = "ready"
	BUILD_STATUS_RUNNING = "running"
	BUILD_STATUS_WAITING = "waiting"

	// 最终状态只能3种
	BUILD_STATUS_CANCEL = "cancel"
	BUILD_STATUS_ERROR  = "error"
	BUILD_STATUS_OK     = "ok"
)

const (
	PIPELINE_VERSION_STATUS_PENDING = "pending"
	PIPELINE_VERSION_STATUS_RUNNING = "running"
	// 最终状态只能2种
	PIPELINE_VERSION_STATUS_ERROR = "error"
	PIPELINE_VERSION_STATUS_OK    = "ok"
)

const (
	BUILD_EVENT_ERR_CHECK_PARAM = "err_check_param"
)

func BuildStatusEnded(stat string) bool {
	if stat == BUILD_STATUS_CANCEL || stat == BUILD_STATUS_ERROR || stat == BUILD_STATUS_OK {
		return true
	}
	return false
}
